package cn.chengpengper.im.platform.common.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/*@formatter:off*/

/**
 * ____________________
 * < 神兽护体，永无bug! >
 * --------------------
 *
 * @author huchengpeng
 * @version v1.0.0
 * @date 2024/11/23 16:12
 * @description 群聊消息DTO
 */

/*@formatter:on*/

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("群聊消息DTO")
public class GroupMessageDto implements Serializable {
    private static final long serialVersionUID = 7443990848771581827L;

    @NotNull(message = "群聊ID不可为空")
    @ApiModelProperty(value = "群聊ID")
    private Long groupId;

    @Length(max = 1024, message = "发送内容长度不可大于1024")
    @NotEmpty(message = "发送内容不可为空")
    @ApiModelProperty(value = "发送内容")
    private String content;

    @NotNull(message = "消息类型不可为空")
    @ApiModelProperty(value = "消息类型")
    private Integer type;

    @Size(max = 20, message = "一次最多只能@20个小伙伴哦")
    @ApiModelProperty(name = "被@用户列表")
    private List<Long> atUserIds;
}
